<?php
class Admin_Model_Tintuccat extends Zend_Db_Table_Abstract{
    protected $_name='table_news_cat';
    protected $_primary='id';
    protected $_sequence=true;    
    
    public function getAll(){        
        $se=$this->select();
        $se->order('stt asc');
                
        if($kq=$this->fetchAll($se))
            return $kq->toArray();
        else
            return false;            
    }
    
     public function getWhere($id){
        $se=$this->select();
        $se->where("id=$id");        
        if($kq=$this->fetchRow($se))
            return $kq->toArray();
        else
            return false;  
    }
    
    public function updateCat($data,$id){
        $this->update($data,"id=$id");          
    }
    
    
    
}

